package com.sxhuayuan.parking.plugin.parking.dao_er.request;

import com.sxhuayuan.parking.exception.SystemException;
import org.apache.commons.lang3.StringUtils;

/**
 * 查询场内临停车辆预缴费信息
 * @author 何龙
 * @date 2019-07-15 11:23
 */
public class DaoerQueryParkingFeeRequestData extends DaoerBaseRequest {

	/** 车牌号 */
	private String carNo;

	/** 卡编号 */
	private String cardId;

	/** 卡号 */
	private String cardNo;

	public String getCarNo() {
		return carNo;
	}

	public void setCarNo(String carNo) {
		this.carNo = carNo;
	}

	public String getCardId() {
		return cardId;
	}

	public void setCardId(String cardId) {
		this.cardId = cardId;
	}

	public String getCardNo() {
		return cardNo;
	}

	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}

	@Override
	public String requestUrl() {
		return "/v2/car/temporarycar/parkingfee/parkid";
	}

	@Override
	public RequestMethod getRequestMethod() {
		return RequestMethod.GET;
	}

	@Override
	protected void checkConstraints() throws SystemException {
		if (StringUtils.isEmpty(cardNo)&&StringUtils.isEmpty(cardId)&&StringUtils.isEmpty(carNo)){
			throw new SystemException("车牌号、卡编号、卡号至少有一个值");
		}
	}
}
